package chapter2.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class HelloGWT implements EntryPoint {
	@Override
	public void onModuleLoad() {
		Button welcomeButton = new Button("Welcome");
		welcomeButton.addClickHandler(new ClickHandler() {
			@Override
			public void onClick(ClickEvent event) {
				Window.alert("Hello GWT!");
			}
		});
		RootPanel.get().add(welcomeButton);
	}
}
